package com.yhsimon.adapter.class_adapter;

public class Phone {
    //充电
    public void charging(IVoltage5V iVoltage5V){
        if(iVoltage5V.output5V()==5){
            System.out.println("当前电压为5V，可以充电...");
        } else if (iVoltage5V.output5V() > 5) {
            System.out.println("当前电压大于5V,无法充电!");
        }else{
            System.out.println("当前电压小于5V,无法充电!");
        }
    }
}
